#!/usr/bin/env php
<?php

define('root_path', getcwd());

require_once 'vendor/autoload.php';
/******************************************************
*for some reason need to include here these files *
******************************************************/
require_once 'core/Dotenv/Dotenv.php';
require_once 'core/Utils/helpers.php';

/**
 * sent second @param, file name if load file other then .env
 */
$dotenv = new Dotenv(getcwd());
$dotenv->load();
/***********************************************************/

require_once 'core/Commands/CreateControllerCommand.php';
require_once 'core/Commands/CreateModelCommand.php';
require_once 'core/Commands/MakeAuth.php';
require_once 'core/Commands/MigrationCommand.php';
require_once 'core/Commands/CreateMigrationCommand.php';
require_once 'core/Commands/RollbackMigrationCommand.php';

use Symfony\Component\Console\Application;
use Core\Commands\CreateControllerCommand;
use Core\Commands\CreateModelCommand;
use Core\Commands\MakeAuth;
use Core\Commands\MigrationCommand;
use Core\Commands\CreateMigrationCommand;
use Core\Commands\RollbackMigrationCommand;


$application = new Application('Welcome to Kframe Developed By Kashif Sohail, Version: ', '1.0.2');
$application->add(new CreateControllerCommand());
$application->add(new CreateModelCommand());
$application->add(new MakeAuth());
$application->add(new MigrationCommand());
$application->add(new CreateMigrationCommand());
$application->add(new RollbackMigrationCommand());

$application->run();
